ConfigurationPanel = function(){
	
	var hospitalGrid = new ConfigGrid({
		name:"hospital",
		title:"医院名称",
		columns : [{
			id : "name",
			name : "name",
			dataIndex : "name"
		}],
		fields : ["id","name"]
	});
	var productGrid = new ConfigGrid({
		name:"product",
		title:"货品名称",
		comps:[{
			xtype : "textfield",
			fieldLabel : "所属产品",
			name : "product.type"
		}],
		columns : [{
			id : "name",
			name : "name",
			dataIndex : "name"
		},{
			name : "type",
			dataIndex : "type",
			width : 70
		}],
		fields : ["id","name","type"]
	});
	var unitGrid = new ConfigGrid({
		name:"unit",
		title:"货品单位",
		columns : [{
			id : "name",
			name : "name",
			dataIndex : "name"
		}],
		fields : ["id","name"]
	});
	
	
	ConfigurationPanel.superclass.constructor.call(this, {
		title : "基本信息管理",
		padding : 20,
		layout : 'column',
		defaults : {
			columnWidth: .3,
			baseCls:'x-plain',
			bodyStyle:'padding:5px 5px 5px 5px'
		},
		items : [{
			items : [hospitalGrid]
		},{
			items : [productGrid]
		},{
			items : [unitGrid]
		}],
		listeners : {
			show : function(){
				hospitalGrid.store.reload();
				productGrid.store.reload();
				unitGrid.store.reload();
			}
		}
	});
};
Ext.extend(ConfigurationPanel, Ext.Panel);
var configurationPanel = new ConfigurationPanel();